<?php
/* @var $this CitysController */
/* @var $model Citys */

$this->breadcrumbs=array(
	'Citys'=>array('index'),
	'Manage',
);

$this->menu=array(
	array('label'=>'List Citys', 'url'=>array('index')),
	array('label'=>'Create Citys', 'url'=>array('create')),
	array('label'=>'统计数据', 'url'=>array('total') , 'linkOptions'=>array('confirm'=>'真的要统计吗？很慢的！')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#citys-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1>Manage Citys</h1>


<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'citys-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		'id',
		'codeid',
		'province',
		'city',
		'citytotal',
		'provincetotal',
		array(
			'name'=>'id',
			// 'title'=>'xxx',
			'value'=>'CHTML::link("详细情况", array("xapple/admin", "cityid"=>"$data->id") )',
			'type'=>'raw'
		), 
		/*
		'sflag',
		'lasttime',
		*/
		array(
			'class'=>'CButtonColumn',
		),
	),
)); ?>
